import instance from '../axios/index'


//获取数据
export const getUserInfo = async () => {
    const res= await instance.get('Advert/advList')
   
    return res.data.data
}

//添加功能

export const addUserInfo = async (data) => {
    const res= await instance.post('/Advert/addAdv',data)
    
    return res.data.data
}

//删除功能

export const deleteUserInfo = async (id) => {
 
    const res= await instance.post( "Advert/deleteAdv",{id})
   
    return res.data.data
}

//回显功能

export const getUserInfoId = async (id) => {
   
    const res= await instance.post( "Advert/editAdv",{id})
   
    return res.data.data
}

//修改功能

export const updateUserInfo = async (data) => {
    const res= await instance.post( "Advert/editAdvTo",data)
    return res.data.data
}